package com.ruoyi.swap.realtime.orderbook.service.impl;

import java.util.List;

import com.ruoyi.swap.realtime.orderbook.domain.VO.SwapOrderbookRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swap.realtime.orderbook.mapper.SwapOrderbookRealtimeDataMapper;
import com.ruoyi.swap.realtime.orderbook.domain.SwapOrderbookRealtimeData;
import com.ruoyi.swap.realtime.orderbook.service.ISwapOrderbookRealtimeDataService;

/**
 * 实时订单簿Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-03
 */
@Service
public class SwapOrderbookRealtimeDataServiceImpl implements ISwapOrderbookRealtimeDataService 
{
    @Autowired
    private SwapOrderbookRealtimeDataMapper swapOrderbookRealtimeDataMapper;

    /**
     * 查询实时订单簿
     * 
     * @param id 实时订单簿主键
     * @return 实时订单簿
     */
    @Override
    public SwapOrderbookRealtimeDataVO selectSwapOrderbookRealtimeDataById(Integer id)
    {
        return swapOrderbookRealtimeDataMapper.selectSwapOrderbookRealtimeDataById(id);
    }

    /**
     * 查询实时订单簿列表
     * 
     * @param swapOrderbookRealtimeData 实时订单簿
     * @return 实时订单簿
     */
    @Override
    public List<SwapOrderbookRealtimeDataVO> selectSwapOrderbookRealtimeDataList(SwapOrderbookRealtimeDataVO swapOrderbookRealtimeData)
    {
        return swapOrderbookRealtimeDataMapper.selectSwapOrderbookRealtimeDataList(swapOrderbookRealtimeData);
    }

    /**
     * 新增实时订单簿
     * 
     * @param swapOrderbookRealtimeData 实时订单簿
     * @return 结果
     */
    @Override
    public int insertSwapOrderbookRealtimeData(SwapOrderbookRealtimeData swapOrderbookRealtimeData)
    {
        return swapOrderbookRealtimeDataMapper.insertSwapOrderbookRealtimeData(swapOrderbookRealtimeData);
    }

    /**
     * 修改实时订单簿
     * 
     * @param swapOrderbookRealtimeData 实时订单簿
     * @return 结果
     */
    @Override
    public int updateSwapOrderbookRealtimeData(SwapOrderbookRealtimeData swapOrderbookRealtimeData)
    {
        return swapOrderbookRealtimeDataMapper.updateSwapOrderbookRealtimeData(swapOrderbookRealtimeData);
    }

    /**
     * 批量删除实时订单簿
     * 
     * @param ids 需要删除的实时订单簿主键
     * @return 结果
     */
    @Override
    public int deleteSwapOrderbookRealtimeDataByIds(Integer[] ids)
    {
        return swapOrderbookRealtimeDataMapper.deleteSwapOrderbookRealtimeDataByIds(ids);
    }

    /**
     * 删除实时订单簿信息
     * 
     * @param id 实时订单簿主键
     * @return 结果
     */
    @Override
    public int deleteSwapOrderbookRealtimeDataById(Integer id)
    {
        return swapOrderbookRealtimeDataMapper.deleteSwapOrderbookRealtimeDataById(id);
    }

    @Override
    public List<SwapOrderbookRealtimeDataVO> selectSwapAllData() {
        return swapOrderbookRealtimeDataMapper.selectSwapAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return swapOrderbookRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
